package com.mall.member.vo;

import com.mall.common.validator.group.AddGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @author: 谢君臣
 * @Date: 2022/8/6-17:29
 * @version: 1.0
 * @function:
 */
@Data
public class MemberRegistryVo {
    @Pattern(regexp = "^[1]([3-9])[0-9]{9}$",message = "手机格式不正确",groups = AddGroup.class)
    private String phone;
    @NotEmpty(message = "用户名不能为空",groups = AddGroup.class)
    @Length(min = 3,max = 18,message = "用户名长度为3-18位字符",groups = AddGroup.class)
    private String userName;
    @NotEmpty(message = "密码不能为空",groups = AddGroup.class)
    private String password;
    @NotEmpty(message = "验证码不能为空",groups = AddGroup.class)
    private String code;
}
